package com.consumer.user.controller;

import com.common.consumer.controller.AbstractConsumerGenericController;
import com.common.consumer.service.ConsumerGenericService;
import com.consumer.user.service.ConsumerOrgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 类描述：组织架构的消费者controller
 *
 * @author linzf
 */
@RestController
@RequestMapping("/org")
public class ConsumerOrgController extends AbstractConsumerGenericController {

    @Autowired
    private ConsumerOrgService consumerOrgService;

    @Override
    protected ConsumerGenericService getService() {
        return this.consumerOrgService;
    }

    /**
     * 功能描述：获取所有的组织架构的数据
     *
     * @return
     */
    @PostMapping("getAllOrgList")
    public Map<String, Object> getAllOrgList(){
        return consumerOrgService.getAllOrgList();
    }
}
